package com.yjps.common.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by pcc on 2015/8/12.
 */
@Controller
@RequestMapping("/test/")
public class TestConttoller {
   /* @Autowired
    TUserService userService;*/

    @RequestMapping(value = "/login",method = RequestMethod.GET)
    public String test(){
//        userService.find();
        System.out.println("........................end");
        return "login";
    }
    @RequestMapping(value = "/login",method = RequestMethod.POST)
    public String login(@RequestParam(value = "username",required = false)String username,String password){
//        userService.find();
//        if(StringUtils.isEmpty(username))
        System.out.println("........................end");
        return "redirect:/test/home";
    }
    @RequestMapping(value = "/home",method = RequestMethod.GET)
    public String home(){
//        userService.find();
        System.out.println("........................home");
        return "home";
    }
}
